<?php
session_start();
if( isset( $_SESSION['counter'] ) )
{
    $_SESSION['counter'] += 1;
}
else
{
    $_SESSION['counter'] = 1;
    $_SESSION["valid_login"] = false;
    $_SESSION["user"] = "Not logged on";
    $_SESSION["uid"]  = "adam";
    $_SESSION["p"]    = -1;
}

require_once('dataManager/DataManager.php');
require_once('dataManager/definitions.php');
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <link href='http://fonts.googleapis.com/css?family=Roboto:400,700,700italic,400italic,300,300italic' rel='stylesheet' type='text/css'>
    <link type="text/css" rel="stylesheet" href="styles/default/style.css" />

    <!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>-->
    <!--<link href="http://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet">-->
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
    <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
    <script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script src="libraries/nabLib.js"></script>
    

    <script type="text/javascript">
        google.load("visualization", "1", {
            packages: ["corechart"]
        });
    </script>

</head>

<body>

    <div id="topBar">
        <a href="" id="logo">Nabton</a>
        <!-- Menu -->
        <div id="menuWrapp">
            <ul id="mainMenu">
                <li><a href="?" id="0" class="pageLink">Home</a></li>
                <li><a href="?" id="1" class="pageLink">About</a></li>
                <?php
                if ($_SESSION["valid_login"])
                {
                    echo '<li><a href="?" id="2" class="pageLink">View Data</a></li>';
                    echo '<li><a href="?" id="3" class="pageLink">Manage Data</a></li>';
                }
                ?>
            </ul>
        </div>
    <div class="clr"></div>

    </div>

    <div id="mainWrap">

        <div id="midBG">
            <div id="contentWrap">
 
            </div>
        </div>

        <div id="footerWrap">
        Nabton v0.6 &copy; 2015 
        <?php
            if ($_SESSION["valid_login"]) 
            echo " - <a href=\"\" id=\"logOut\">Log out</a>";
        ?>
        </div>

    </div>

</body>

